package com.example.tabdemo;

import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

import android.os.Bundle;
import android.app.Activity;
import android.widget.TextView;

public class HomeActivity extends Activity {
	
	private String surl =
			"http://demo.finemanager.com/api/team/course/list?cid=75&_=1388739591507";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		TextView textview  = new TextView(this);
		
	}
	
	public void readJson(){
		
	}
	
	public void connServerbyPost(){
		HttpURLConnection urlconn = null;
		try {
			URL url = new URL(surl);
			urlconn.setRequestMethod("POST");
			urlconn.setDoOutput(true);
			urlconn.setDoInput(true);
			urlconn.setUseCaches(true);
			urlconn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
			urlconn.connect();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
